home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / cupsys-driver-gutenprint.postinst < prev    next >
Encoding:
Text File  |  2007-03-27  |  2.5 KB  |  64 lines

  1. #! /bin/sh
  2. # postinst script for cupsys-driver-gutenprint
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <postinst> `configure' <most-recently-configured-version>
  10. #        * <old-postinst> `abort-upgrade' <new version>
  11. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  12. #          <new-version>
  13. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  14. #          <failed-install-package> <version> `removing'
  15. #          <conflicting-package> <version>
  16. # for details, see /usr/doc/packaging-manual/
  17. #
  18. # quoting from the policy:
  19. #     Any necessary prompting should almost always be confined to the
  20. #     post-installation script, and should be protected with a conditional
  21. #     so that unnecessary prompting doesn't happen if a package's
  22. #     installation fails and the `postinst' is called with `abort-upgrade',
  23. #     `abort-remove' or `abort-deconfigure'.
  24.  
  25. #s/^if\s+\[\s+"\$1"\s+=\s+"configure"\s+\];\s+then\s+ldconfig\b//m;
  26.  
  27. if [ "$1" = "configure" ]; then
  28.   # Upgrade in-use PPD files
  29.   /usr/sbin/cups-genppdupdate.5.0 > /dev/null
  30.  
  31.   # Delete all old PPDs, we let CUPS auto-generate the PPDs on the fly
  32.   if [ -h /usr/share/ppd/gutenprint ] || [ -e /usr/share/ppd/gutenprint ]; then
  33.     rm -f /usr/share/ppd/gutenprint/*/*/*.ppd.gz 2>/dev/null || :
  34.     rmdir --ignore-fail-on-non-empty /usr/share/ppd/gutenprint/*/* 2>/dev/null || :
  35.     rmdir --ignore-fail-on-non-empty /usr/share/ppd/gutenprint/* 2>/dev/null || :
  36.     rmdir --ignore-fail-on-non-empty /usr/share/ppd/gutenprint 2>/dev/null || \
  37.       rm -f /usr/share/ppd/gutenprint 2>/dev/null || :
  38.   fi
  39.   if [ -h /usr/share/cups/model/gutenprint ] || [ -e /usr/share/cups/model/gutenprint ]; then
  40.     rm -f /usr/share/cups/model/gutenprint/*/*/*.ppd.gz 2>/dev/null || :
  41.     rmdir --ignore-fail-on-non-empty /usr/share/cups/model/gutenprint/*/* 2>/dev/null || :
  42.     rmdir --ignore-fail-on-non-empty /usr/share/cups/model/gutenprint/* 2>/dev/null || :
  43.     rmdir --ignore-fail-on-non-empty /usr/share/cups/model/gutenprint 2>/dev/null || \
  44.       rm -f /usr/share/cups/model/gutenprint 2>/dev/null || :
  45.   fi
  46.  
  47.   # Restart CUPSys (to register updated PPDs)
  48.   [ -x /etc/init.d/cupsys ] && invoke-rc.d cupsys force-reload || true
  49. elif [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remove" ] || [ "$1" = "abort-deconfigure" ]; then
  50.   :
  51. else
  52.   echo "postinst called with unknown argument \`$1'" >&2
  53.   exit 0
  54. fi
  55.  
  56. # dh_installdeb will replace this with shell code automatically
  57. # generated by other debhelper scripts.
  58.  
  59.  
  60.  
  61. exit 0
  62.  
  63.  
  64.